# # write by qingluan
# this is a config file
# include db and debug , static path
from QmongoHelper import dbhelper
# here to load all controllers

from controller import *

APP_NAME = "localServer"
# db engine
db_engine = dbhelper(APP_NAME)

# static path
static_path = "./static"


Settings = {
    'db': db_engine,
    'debug': True,
    'autoreload': True,
    'cookie_secret': 'This string can be any thing you want',
    'static_path': static_path,
}


# follow is router
appication = tornado.web.Application([
    (r'/', IndexHandler),
    # add some new route to router
    (r'/local', LocalHandler),
    (r'/activity', ActivityHandler),
    (r'/interact', InteractHandler),
    (r'/socket', SocketHandler),
    (r'/node', NodeHandler)
    # <route></route>
    # (r'/main',MainHandler),
], **Settings)


# setting port
port = 8080
